<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,aItemress=no">
	<title>发布详情6665</title>
	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
	<link rel="stylesheet" type="text/css" href="../../css/app.css" />
	<link rel="stylesheet" type="text/css" href="../../css/swiper.min.css" />
	<style type="text/css">
		body {
			background-color: #FFFFFF;
		}

		.swiper-pagination {
			bottom: 0;
			width: 100%;
		}

		.swiper-pagination-bullet {
			width: 0.2rem;
			height: 0.2rem;
			margin-right: 0.3rem;
			background: #FFFFFF;
			opacity: 0.46;
		}

		.swiper-pagination-bullet-active {
			background: #FFFFFF;
			opacity: 1;
		}

		.flex-row-center {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
		}

		.flex-row-top {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: flex-start;
			padding-top: 1rem;
			padding-bottom: 0.75rem;
		}

		.aui-bar-tab .aui-bar-tab-label {
			display: inline-block;
		}

		.aui-bar-tab-item img {
			width: 1.1rem;
			display: inline-block;
			vertical-align: middle;
		}

		.img-inlineblock img {
			display: inline-block;
			vertical-align: sub;
		}

		.aui-bar-tab .aui-bar-tab-item {
			display: table-cell;
			position: relative;
			width: 1%;
			height: 2.5rem;
			text-align: center;
			vertical-align: middle;
			padding-bottom: 1.1rem;
		}

		.is_banner {
			margin-top: 5rem;
		}
	</style>
</head>

<body>
	<!-- 审核通过的发布详情 -->
	<div id="app" v-cloak="">
		<!-- <header v-show="info.catid==2&&info.img_path.length>0 || info.catid==1" id="aui-header" class="aui-bar aui-bar-nav" style="position: fixed;z-index: 10;padding-top: -1rem;background-color:#fff;display:flex;top:-1rem;">
			<a class="aui-pull-left" tapmode onclick="close_win()" style="flex:1;margin-top:.2rem;width:1.15rem;margin-left:.75rem;padding:0;">
				<img class="btn-img-back" src="../../image/btn/btn-back-2.png" />
			</a>
			<span style="flex:1;text-align:center;font-size:.9rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(34,34,34,1);padding-left:1rem;box-sizing:border-box;margin-top:1rem;">发布详情</span>
			<a class="aui-pull-right" tapmode onclick="openSharebox()" style="flex:1;position:relative;margin-right:.5rem;">
				<img style="width:1.15rem;margin-top:-.2rem;position:absolute;right:.5rem;bottom:.6rem;" class="btn-img-share" src="../../image/btn/dots.png" />
			</a>
		</header>
		<header v-show="info.catid==2&&info.img_path.length==0" id="aui-header" class="aui-bar aui-bar-nav ming-bg-opacity0" style="position: fixed;z-index: 10;padding-top: 2rem;background-color:#fff;">
			<a class="aui-pull-left" tapmode onclick="close_win()" style="margin-left:.75rem;padding:0;margin-top:-.1rem;">
				<img class="btn-img-back" src="../../image/btn/btn-back.png" />
			</a>
			<span style="flex:1;text-align:center;font-size:.9rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(34,34,34,1);box-sizing:border-box;margin-right:1.8rem;">发布详情</span>
		</header> -->

		<header id="aui-header" class="aui-bar aui-bar-nav" style="position: fixed;z-index: 10;padding-top: -1rem;background-color:#fff;display:flex;top:-1rem;">
			<a class="aui-pull-left" tapmode onclick="close_win()" style="flex:1;margin-top:.2rem;width:1.15rem;margin-left:.75rem;padding:0;">
				<img class="btn-img-back" src="../../image/btn/btn-back-2.png" />
			</a>
			<span style="flex:1;text-align:center;font-size:.9rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(34,34,34,1);padding-left:1rem;box-sizing:border-box;margin-top:1rem;">发布详情</span>
			<a class="aui-pull-right" tapmode onclick="openSharebox()" style="flex:1;position:relative;margin-right:.5rem;">
				<img style="width:1.15rem;margin-top:-.2rem;position:absolute;right:.5rem;bottom:.6rem;" class="btn-img-share" src="../../image/btn/dots.png" />
			</a>
		</header>

		<!-- 发布的图片 -->
		<div class="" style="position: relative;">
			<div class="swiper-container">
				<div class="swiper-wrapper">
					<div v-if="info.catid==1" class="swiper-slide" style="height:20.5rem;">
						<img style="width: 100%;margin-top:5rem;" :src="info.cover" />
					</div>
					<div v-if="info.catid==2" v-for="vo in info.img_path" class="swiper-slide" style="height:20.5rem;">
						<img style="width: 100%;margin-top:5rem;" :src="vo" />
					</div>
				</div>
			</div>
			<div class="swiper-pagination"></div>
		</div>
		<!-- 发布的图片 -->
		<!-- <div class="" style="position: relative;margin-top:-1rem;">
			<div class="swiper-container">
				<div class="swiper-wrapper">
					<div v-if="info.catid==1" class="swiper-slide" style="height:20.5rem;">
						<img style="width: 100%;margin-top:5rem;" :src="info.cover" />
					</div>
					<div v-if="info.catid==2" v-for="vo in info.img_path" class="swiper-slide" style="height:20.5rem;">
						<img style="width: 100%;margin-top:5rem;" :src="vo" />
					</div>
				</div>
			</div>
			<div class="swiper-pagination"></div>
		</div> -->
		<!-- 昵称/发布时间 -->
		<div style="padding:0 .75rem;border-bottom:0.5rem solid rgba(246,246,246,1);" :class="{'is_banner':info.img_path.length == 0}">
			<!-- 发布的标题 -->
			<div id="title" class="aui-ellipsis-2" v-html="info.title" style="font-size:1rem;font-family:PingFangSC-Medium;font-weight:500;color:rgba(34,34,34,1);margin-top: 1rem;margin-bottom: 1rem;">
			</div>
			<!-- 头像\昵称\时间 -->
			<div class="flex-row-center" style="height: 2rem;">
				<div class="" style="width: 1.8rem;margin-right:0.25rem;">
					<img :src="info.avatar" class="aui-img-round">
				</div>
				<div class="" style="display:flex;width:100%;height:100%;">
					<div class="" style="flex:6;display:flex;flex-direction:column;overflow:hidden;">
						<span style="flex:1;font-size:.75rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(102,102,102,1);">
								{{info.nickname}}
						</span>
						<span v-if="info.remark" class="aui-ellipsis-1" style="flex:1;font-size:.6rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(187,187,187,1);">
								{{info.remark}}
						</span>
						<span v-else class="aui-ellipsis-1" style="flex:1;font-size:.6rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(187,187,187,1);">
								暂无简介
						</span>
					</div>
					<div class="" style="flex:4;font-size:.5rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(187,187,187,1);position:relative;">
						<span style="display:inline-block;margin-top:.4rem;text-align:right;position:absolute;right:0;">
								{{info.create_time}}
						</span>
					</div>
				</div>
			</div>
			<!-- 发布的内容 -->
			<div class="" style="margin:1rem 0;">
				<div v-html="info.content&&info.content.replace(/\n/g, '<br/>')" style="margin-left:.3rem;margin-right:.5rem;font-size:.75rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(68,68,68,1);">
				</div>
			</div>
		</div>

		<!-- 评论块 -->
		<div class="" style="background-color:#fff;">
			<div class="flex-row-center" style="height: 2.5rem;padding:0 .75rem;border-bottom:1px solid rgba(238,238,238,0.5);" tapmode @click="openWin_circle_comment(info.id,info.catid)">
				<div style="font-size:.7rem;font-family:PingFangSC-Medium;font-weight:500;color:rgba(51,51,51,1);">
					<img src="../../image/icon/lines.png" style="width:.2rem;height:.7rem;display:inline-block;margin-top:.1rem;transform:translateY(.1rem);" alt=""> 全部评论
				</div>
				<div class="aui-text-right" style="flex: 1;font-size:.6rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(153,153,153,1);">
					共{{info.comment_num}}条
				</div>
				<div class="aui-margin-l-5">
					<img src="../../image/btn/btn-right-s.png" style="display:inline-block;width:.3rem;height:.55rem;" />
				</div>
			</div>
			<div class=""  tapmode @click="openWin_circle_comment(info.id,info.catid)">
				<div v-for="(vo,index) in info.comment" class="ming-margin-0-10 flex-row-top" style="padding-bottom:0">
					<div class="aui-margin-r-10" style="display:inline-block;width: 1.4rem;">
						<img :src="vo.avatar" style="border-radius: 50%;object-fit: cover;">
					</div>
					<div class="" style="flex: 1;border-bottom:1px solid rgba(238,238,238,0.5);;">
						<div style="font-size:.65rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(119,119,119,1);">
							{{vo.nickname}}
						</div>
						<div class="aui-font-size-15 aui-ellipsis-2 img-inlineblock" v-html="transEmo(vo.content).replace(/\n/g, '<br/>')" style="font-size:.75rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(68,68,68,1);margin-top:0.25rem;">
						</div>

						<div v-if="vo.next.length>0" class="flex-row-center" style="height: 1.7rem;line-height: 1.7rem; background-color: #F5F5F5;padding-left: 0.85rem;margin-top:.5rem;border-radius:0.3rem;margin-bottom:.55rem;">
							<div class="aui-margin-r-5" style="font-size:.65rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(114,213,239,1);">
								共{{vo.next.length}}条回复>
							</div>
							<!-- <div class="aui-font-size-14 ming-text-hui6" style="flex: 1;">
									<img src="../../image/btn/btn-right-s.png" / style="width: 0.35rem;">
								</div> -->
						</div>

						<div :class="{'flex-row-center':1, 'aui-padded-r-10':1,'line_active':index != info.comment.length - 1}" style="line-height: 1.5rem;padding-bottom:0.8rem;">
							<div style="font-size:.55rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(153,153,153,1);">
								{{vo.add_time}}
							</div>
							<div class="aui-font-size-14 ming-text-hui6 aui-text-right" style="flex: 1;">
								<!-- 回复 -->
								<img v-if="vo.is_comment=='0'" src="../../image/icon/icon-comment.png" style="display: inline-block;vertical-align: sub;width:.9rem;margin:.3rem 1rem 0 0;">
								<img v-if="vo.is_comment>'0'" src="../../image/icon/news_detail.png" style="display: inline-block;vertical-align: sub;width:.9rem;margin:.3rem 1rem 0 0;">

							</div>
							<!-- <div class="aui-font-size-14 ming-text-hui6 aui-text-center" style="width: 0.95rem;">
									•
								</div> -->
							<div class="" style="display:inline-block;width: .9rem;">
								<img v-show="vo.is_zan=='0'" src="../../image/icon/icon-zan.png" style="display: inline-block;vertical-align: sub;">
								<img v-show="vo.is_zan=='1'" src="../../image/icon/icon-zan-active.png" style="display: inline-block;vertical-align: sub;">
							</div>
							<div style="font-size:.6rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(153,153,153,1);">
								{{vo.zan_num}}
							</div>
						</div>
					</div>
				</div>
				<div v-if="info.comment<1" class="aui-text-center" style="margin-top:2.5rem;">
					<img src="../../image/bg/no-comment.png" style="width:7.55rem;margin-left:50%;transform:translateX(-50%);margin-bottom:1.35rem" />
					<div class="" style="font-size:.75rem;font-family:PingFangSC-Regular;font-weight:400;color:#B3B3B3;margin-bottom:2.5rem;">
						暂无评论
					</div>
				</div>
			</div>
			<div class="lh10" style="height: 3rem;background-color:#fff;"></div>
		</div>



		<footer class="aui-bar aui-bar-tab aui-border-t" id="footer" style="position:fixed;bottom:0rem;padding-top:.5rem;font-size:0.7rem;font-family:PingFangSC-Regular;font-weight:400;color:rgba(153,153,153,1);">
			<div class="aui-bar-tab-item" tapmode onclick="openSharebox()">
				<img class="" v-if="info.is_share=='0'" src="../../image/icon/share_detail.png" />
				<img v-if="info.is_share=='1'" src="../../image/icon/icon-share-active.png" />
				<div class="aui-bar-tab-label">{{info.repeat_num}}</div>
			</div>
			<div class="aui-bar-tab-item" tapmode onclick="openchatbox()">
				<img src="../../image/icon/news_detail.png" />
				<!--<img src="../../image/icon/icon-comment-active.png" />-->
				<div class="aui-bar-tab-label">{{info.comment_num}}</div>
			</div>
			<div class="aui-bar-tab-item" tapmode onclick="opera_data(1)">
				<img v-if="info.is_zan=='0'" src="../../image/icon/love_detail.png" />
				<img v-if="info.is_zan=='1'" src="../../image/icon/icon-zan-active.png" />
				<div class="aui-bar-tab-label">{{info.zan_num}}</div>
			</div>
			<div class="aui-bar-tab-item" tapmode onclick="opera_data(2)">
				<img v-if="info.is_fav=='0'" src="../../image/icon/star_detail.png" />
				<img v-if="info.is_fav=='1'" src="../../image/icon/icon-fav-active.png" />
			</div>
		</footer>

		<div v-show="share_show" class="aui-mask aui-mask-in" style="z-index:9999;">
			<div class="aui-text-center" style="width: 11rem;height: 155px;margin-left: calc(50vw - 110px);margin-top: calc(40vh - 78px);position: relative;">
				<img style="width: 11rem;height: 7.75rem;" src="../../image/bg/bg-share-gold.png" />
				<div class="" style="background:#fff;position: absolute;width: 100%;">
					<span style="font-size: 1.5rem;padding-bottom: .85rem;">+{{share_gold}}</span>
					<p class="aui-font-size-13" style="padding-bottom: .85rem;">恭喜您获得金币奖励</p>
				</div>
				<div align="center" @click="share_show_hide()">
					<img style="max-height: 100%;max-width: 800%;margin-top:60px;" src="../../image/bg/bg-share-gold-bottom.png" />
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/emoji.js"></script>
<script type="text/javascript" src="../../script/swiper.min.js"></script>
<script type="text/javascript" src="../../script/aui-sharebox.js"></script>
<script type="text/javascript" src="../../script/aui-dialog.js"></script>
<script>
	var vm = new Vue({
		el: "#app",
		data: {
			id: 0,
			info: {},
			share_pic: '',
			pic_done: false,
			clickEmotion: false,
			content: '',
			share_show: false,
			share_gold: 0
		},
		methods: {
			get_list: function() {
				get_data('api/xiaoyouquan/xyqDetail', {
					token: $api.getStorage('token'),
					id: vm.id
				}, function(ret) {
					if (ret.status) {
						vm.info = ret.data
						setTimeout(function() {
								var swiper = new Swiper('.swiper-container', {
									pagination: '.swiper-pagination',
									autoplay: false, //可选选项，自动滑动
									loop: true, //可选选项，是否循环
									autoplayDisableOnInteraction: false, //注意此参数，默认为true
								});
								$api.fixStatusBar($api.byId('aui-header'))
							}, 100)
							//下载封面图片,分享图片用.
						if (vm.info.catid == 2) {
							if (vm.info.img_path.length < 1) {
								vm.share_pic = '../../image/logo.jpg'
								vm.pic_done = true
							} else {
								download(vm.info.img_path[0], function(ret) {
									compress_pic(ret, function() {
										vm.share_pic = ret;
										vm.pic_done = true
									})
								})
							}
						}
						if (vm.info.catid == 1) {
							if (!vm.info.cover) {
								vm.share_pic = '../../image/logo.jpg'
								vm.pic_done = true
							} else {
								download(vm.info.cover, function(ret) {
									compress_pic(ret, function() {
										vm.share_pic = ret;
										vm.pic_done = true
									})
								})
							}
						}
					}
				})
			},
			transEmo: function(emoMsg) {
				var emoPath, transMsg;
				var reg = /\[(.*?)\]/gm;
				transMsg = emoMsg.replace(reg, function(match) {
					for (var i = 0, len = emoData.length; i < len; i++) {
						if (emoData[i].text === match) {
							emoPath = '../../res/emotion/' + emoData[i].name + '.png';
							return '<img width="20" height="20" src="' + emoPath + '" />'
						}
					}
					return match;
				});
				return transMsg;
			}
		}
	})
	var UIChatBox;
	apiready = function() {
		$api.fixTabBar($api.byId('footer'))
		UIChatBox = api.require('UIChatBox');
		//			$api.fixStatusBar($api.byId('aui-header'))
		vm.id = $api.getStorage('id')
		vm.get_list()
		var logined = false;
		if ($api.getStorage('userinfo')) {
			logined = true;
		}
	};

	function opera_data(type) {
		var source = vm.info.catid == '1' ? 'xx' : 'xyx'
		opera(vm.id, source, type, function(ret) {
			if (ret.status) {
				//					toast(ret.msg)
				vm.get_list()
					//通知帖子刷新
				send_event('circle_opera')
				send_event('fav_ref')
			}
		})
	}

	function del_xiaoyouxiu() {
		var dialog = new auiDialog();
		dialog.alert({
			title: "提示",
			msg: '确定要删除吗？',
			buttons: ['取消', '确定']
		}, function(ret) {
			if (ret) {
				if (ret.buttonIndex == '2') {
					get_data('api/xiaoyouquan/xyqDelPublish', {
						token: $api.getStorage('token'),
						id: vm.id
					}, function(ret) {
						if (ret.status) {
							toast(ret.msg)
							send_event('publishok')
							delay_close()
						}
					})
				}
			}
		})
	}

	function sendComment() {
		get_data('api/Xiaoyouquan/sendComment', {
			token: $api.getStorage('token'),
			article_id: vm.id,
			catid: vm.info.catid,
			pid: 0,
			to_uid: 0,
			content: vm.content
		}, function(ret) {
			toast(ret.msg)
			if (ret.status) {
				vm.content = ''
				vm.get_list()
				UIChatBox.closeKeyboard();
				UIChatBox.close();
			}
		})
	}

	function openchatbox() {
		if (!$api.getStorage('token')) {
			openWin_login()
			return;
		}
		UIChatBox.open({
			autoFocus: true,
			placeholder: '请输入您的评论',
			maxRows: 4,
			emotionPath: 'widget://res/emotion',
			texts: {
				sendBtn: {
					title: '发布'
				}
			},
			styles: {
				inputBar: {
					borderColor: '#f5f5f5',
					bgColor: '#ffffff'
				},
				inputBox: {
					borderColor: '#f5f5f5',
					bgColor: '#f5f5f5',
					boardBgColor: '#FFFFFF'
				},
				emotionBtn: {
					normalImg: 'widget://image/btn/btn-smile.png'
				},
				keyboardBtn: {
					normalImg: 'widget://res/img/chatBox_key1.png'
				},
				indicator: {
					target: 'both',
					color: '#c4c4c4',
					activeColor: '#9e9e9e'
				},
				sendBtn: {
					titleColor: '#ffffff',
					bg: '#ff00ff',
					activeBg: '#ff00ff',
					titleSize: 14
				}
			}
		}, function(ret, err) {
			if (ret) {
				if (vm.content != '') {
					UIChatBox.value({
						msg: vm.content
					});
				}
				if (ret.eventType == 'send' && ret.msg != '') {
					vm.content = ucs2_to_utf16(ret.msg)
					sendComment()
				}
				UIChatBox.addEventListener({
					target: 'inputBar',
					name: 'valueChanged'
				}, function(ret, err) {
					if (ret) {
						console.log(JSON.stringify(ret));
						if (countSymbols(ret.value.length) > 50) {
							alert('评论超过50个字')
							return;
							UIChatBox.value({
								msg: ret.value.slice(0, 50)
							});
							vm.content = ret.value.slice(0, 50)
						} else {
							vm.content = ret.value
						}
					} else {
						console.log(JSON.stringify(err));
					}
				});
				UIChatBox.addEventListener({
					target: 'inputBar',
					name: 'move'
				}, function(ret, err) {
					if (ret) {
						//							console.log(JSON.stringify(ret));
						setTimeout(function() {
							if (ret.panelHeight == '0' && !vm.clickEmotion) {
								UIChatBox.close();
							}
						}, 50)
					} else {
						console.log(JSON.stringify(err));
					}
				});
				UIChatBox.addEventListener({
					target: 'inputBar',
					name: 'showEmotion'
				}, function(ret, err) {
					if (ret) {
						//							console.log('点击表情了');
						vm.clickEmotion = true;
						setTimeout(function() {
							vm.clickEmotion = false
						}, 500)
					} else {
						console.log(JSON.stringify(err));
					}
				});
				//console.log(JSON.stringify(ret));
			} else {
				console.log(JSON.stringify(err));
			}
		});
	}


	function countSymbols(string) {
		return twemoji.parse(string).replace(/<img.+?\/>/g, '_').length;
	}

	function openSharebox() {
		if (!$api.getStorage('token')) {
			openWin_login()
			return;
		}
		var sharebox = new auiSharebox();
		sharebox.init({
			frameBounces: true, //当前页面是否弹动，（主要针对安卓端）
			buttons: [{
				image: '../../image/btn/Space.png',
				text: '朋友圈',
				value: 'wx-circle'
			}, {
				image: '../../image/btn/friends.png',
				text: '微信好友12',
				value: 'wx' //可选
			} {

				image: '../../image/btn/report.png',
				text: '举报',
				value: '举报'
			}],
			col: 3,
			//shareTitle: '' //可选,当然也可以采用下面的方式使用图标
			cancelTitle: '取消'
		}, function(ret) {
			if (ret) {
				console.log(ret.buttonIndex + '/' + ret.buttonValue)
				if (ret.buttonIndex == 1) {
					shareTowx('timeline')
				}
				if (ret.buttonIndex == 2) {
					shareTowx('session')
				}
				if (ret.buttonIndex == 3) {
					shareTowb()
						// open_win('report', 'circle/report.html', false)
				}
				if (ret.buttonIndex == 4) {
					open_win('report', 'widget://html/circle/report.html', false)
						// open_win({})
						// api.openWin({
						// 	name: 'actionsheet',
						// 	url: 'actionsheet.html',
						// 	bounces: false,
						// 	rect: {
						// 		x: 0,
						// 		y: 0,
						// 		w: 'auto',
						// 		h: 'auto'
						// 	},
						// 	vScrollBarEnabled: false,
						// 	bgColor: 'rgba(0,0,0,0)'
						// })
				}
			}
		})
	}

	function shareTowx(type) {
		var contentUrl = 'http://zm.zonmay.com/wap/share/circle/id/' + vm.id + '.html'
			//			var title = vm.info.title
		var title = $api.text($api.byId('title'))
		var wx = api.require('wxPlus');
		wx.isInstalled(function(ret, err) {
			if (ret.installed) {} else {
				toast('当前设备未安装微信客户端');
				return;
			}
		});
		wx.shareWebpage({
			scene: type,
			title: title,
			description: title,
			contentUrl: contentUrl,
			thumb: vm.share_pic
		}, function(ret, err) {
			if (ret.status) {
				toast('分享成功');
				get_data('api/user/shareTakeGold', {
					token: $api.getStorage('token'),
					article_id: vm.id
				}, function(ret) {
					if (ret.status) {
						vm.share_gold = ret.data.gold
						vm.share_show = true
						vm.info.repeat_num += 1;
						setTimeout(function() {
							vm.share_show = false
						}, 300000)
					}
				})
			} else {
				if (err.code == '2') {
					toast('取消分享');
				}
				console.log(err.code);
			}
		});
	}

	function shareTowb() {
		var contentUrl = 'http://zm.zonmay.com/wap/share/circle/id/' + vm.id + '.html'
			//			var title = vm.info.title
		var title = $api.text($api.byId('title'))
		var weibo = api.require('weiboPlus');
		weibo.shareWebPage({
			text: title + '。详情点击链接查看',
			title: title,
			description: title,
			//				thumb: vm.info.cover,
			thumb: vm.share_pic,
			contentUrl: contentUrl
		}, function(ret, err) {
			console.log(JSON.stringify(ret))
			if (ret.status) {
				toast('分享成功');
				get_data('api/user/shareTakeGold', {
					token: $api.getStorage('token'),
					article_id: vm.id
				}, function(ret) {
					if (ret.status) {
						vm.share_gold = ret.data.gold
						vm.share_show = true
						vm.info.repeat_num += 1;
						setTimeout(function() {
							vm.share_show = false
						}, 300000)
					}
				})
			} else {
				if (err.code == '1') {
					toast('取消分享');
				}
				console.log(JSON.stringify(err))
			}
		});
	}

	function share_show_hide() {
		vm.share_show = false;
	}
</script>

</html>
